package com.alen.sun.service.Impl;

import com.alen.sun.bean.Content;
import com.alen.sun.dao.ContentMapper;
import com.alen.sun.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContentServiceImpl implements ContentService {
    @Autowired
    private ContentMapper contentMapper;
    @Override
    public List<Content> list() {
        List<Content> contents=contentMapper.list();
        return contents;
    }

    @Override
    public void add(Content content) {
        contentMapper.add(content);
    }

    @Override
    public void delete(Integer id) {
        contentMapper.delete(id);
    }

    @Override
    public Content getById(Integer id) {
        Content content=contentMapper.getById(id);
        return content;
    }

    @Override
    public void update(Content content) {
        contentMapper.update(content);
    }


    @Override
    public void deletes(List<Integer> ids) {
        contentMapper.deletes(ids);
    }
}
